using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class LeanTween : MonoBehaviour
{
	public static bool throwErrors = true;

	public static float tau = (float)Math.PI * 2f;

	private static LTDescrImpl[] tweens;

	private static int[] tweensFinished;

	private static LTDescrImpl tween;

	private static int tweenMaxSearch = -1;

	private static int maxTweens = 400;

	private static int frameRendered = -1;

	private static GameObject _tweenEmpty;

	private static float dtEstimated = -1f;

	public static float dtManual;

	private static float dt;

	private static float dtActual;

	private static int i;

	private static int j;

	private static int finishedCnt;

	private static AnimationCurve punch = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.112586f, 0.9976035f), new Keyframe(0.3120486f, -0.1720615f), new Keyframe(0.4316337f, 0.07030682f), new Keyframe(0.5524869f, -0.03141804f), new Keyframe(0.6549395f, 0.003909959f), new Keyframe(0.770987f, -0.009817753f), new Keyframe(0.8838775f, 0.001939224f), new Keyframe(1f, 0f));

	private static AnimationCurve shake = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.25f, 1f), new Keyframe(0.75f, -1f), new Keyframe(1f, 0f));

	private static Transform trans;

	private static float timeTotal;

	private static TweenAction tweenAction;

	private static float ratioPassed;

	private static float from;

	private static float val;

	private static bool isTweenFinished;

	private static int maxTweenReached;

	private static Vector3 newVect;

	private static GameObject target;

	private static GameObject customTarget;

	public static int startSearch = 0;

	public static LTDescr d;

	private static Action<LTEvent>[] eventListeners;

	private static GameObject[] goListeners;

	private static int eventsMaxSearch = 0;

	public static int EVENTS_MAX = 10;

	public static int LISTENERS_MAX = 10;

	private static int INIT_LISTENERS_MAX = LISTENERS_MAX;

	[CompilerGenerated]
	private static UnityAction<Scene, LoadSceneMode> _003C_003Ef__mg_0024cache0;

	public static int maxSearch => tweenMaxSearch;

	public static int maxSimulataneousTweens => maxTweens;

	public static int tweensRunning
	{
		get
		{
			int num = 0;
			for (int i = 0; i <= tweenMaxSearch; i++)
			{
				if (tweens[i].toggle)
				{
					num++;
				}
			}
			return num;
		}
	}

	public static GameObject tweenEmpty
	{
		get
		{
			init(maxTweens);
			return _tweenEmpty;
		}
	}

	public static void init()
	{
		init(maxTweens);
	}

	public static void init(int maxSimultaneousTweens)
	{
		if (tweens == null)
		{
			maxTweens = maxSimultaneousTweens;
			tweens = new LTDescrImpl[maxTweens];
			tweensFinished = new int[maxTweens];
			_tweenEmpty = new GameObject();
			_tweenEmpty.name = "~LeanTween";
			_tweenEmpty.AddComponent(typeof(LeanTween));
			_tweenEmpty.isStatic = true;
			_tweenEmpty.hideFlags = HideFlags.HideAndDontSave;
			UnityEngine.Object.DontDestroyOnLoad(_tweenEmpty);
			for (int i = 0; i < maxTweens; i++)
			{
				tweens[i] = new LTDescrImpl();
			}
			SceneManager.sceneLoaded += onLevelWasLoaded54;
		}
	}

	public static void reset()
	{
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			tweens[i].toggle = false;
		}
		tweens = null;
		UnityEngine.Object.Destroy(_tweenEmpty);
	}

	public void Update()
	{
		update();
	}

	private static void onLevelWasLoaded54(Scene scene, LoadSceneMode mode)
	{
		internalOnLevelWasLoaded(scene.buildIndex);
	}

	private static void internalOnLevelWasLoaded(int lvl)
	{
		LTGUI.reset();
	}

	public static void update()
	{
		if (frameRendered == Time.frameCount)
		{
			return;
		}
		init();
		if (dtEstimated < 0f)
		{
			dtEstimated = 0f;
		}
		else
		{
			dtEstimated = Time.unscaledDeltaTime;
		}
		dtActual = Time.deltaTime;
		maxTweenReached = 0;
		finishedCnt = 0;
		for (int i = 0; i <= tweenMaxSearch && i < maxTweens; i++)
		{
			if (!tweens[i].toggle)
			{
				continue;
			}
			maxTweenReached = i;
			tween = tweens[i];
			trans = tween.trans;
			timeTotal = tween.time;
			tweenAction = tween.type;
			if (tween.useEstimatedTime)
			{
				dt = dtEstimated;
			}
			else if (tween.useFrames)
			{
				dt = 1f;
			}
			else if (tween.useManualTime)
			{
				dt = dtManual;
			}
			else if (tween.direction == 0f)
			{
				dt = 0f;
			}
			else
			{
				dt = dtActual;
			}
			if (trans == null)
			{
				removeTween(i);
				continue;
			}
			if (tweenAction == TweenAction.MOVE_TO_TRANSFORM)
			{
				tween.to = tween.toTrans.position;
				tween.diff = tween.to - tween.from;
			}
			isTweenFinished = false;
			if (tween.delay <= 0f)
			{
				if (tween.passed + dt > tween.time && tween.direction > 0f)
				{
					isTweenFinished = true;
					tween.passed = tween.time;
				}
				else if (tween.direction < 0f && tween.passed - dt < 0f)
				{
					isTweenFinished = true;
					tween.passed = Mathf.Epsilon;
				}
			}
			if (!tween.hasInitiliazed && (((double)tween.passed == 0.0 && (double)tween.delay == 0.0) || (double)tween.passed > 0.0))
			{
				tween.init();
			}
			if (tween.delay <= 0f && tween.direction != 0f)
			{
				if (timeTotal <= 0f)
				{
					ratioPassed = 1f;
				}
				else
				{
					ratioPassed = tween.passed / timeTotal;
				}
				if (ratioPassed > 1f)
				{
					ratioPassed = 1f;
				}
				else if (ratioPassed < 0f)
				{
					ratioPassed = 0f;
				}
				if (tweenAction >= TweenAction.MOVE_X && tweenAction < TweenAction.MOVE)
				{
					if (tween.animationCurve != null)
					{
						val = tweenOnCurve(tween, ratioPassed);
					}
					else
					{
						switch (tween.tweenType)
						{
						case LeanTweenType.linear:
						{
							Vector3 vector7 = tween.from;
							float x7 = vector7.x;
							Vector3 diff4 = tween.diff;
							val = x7 + diff4.x * ratioPassed;
							break;
						}
						case LeanTweenType.easeOutQuad:
						{
							Vector3 vector6 = tween.from;
							float x6 = vector6.x;
							Vector3 diff3 = tween.diff;
							val = easeOutQuadOpt(x6, diff3.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInQuad:
						{
							Vector3 vector5 = tween.from;
							float x5 = vector5.x;
							Vector3 diff2 = tween.diff;
							val = easeInQuadOpt(x5, diff2.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutQuad:
						{
							Vector3 vector8 = tween.from;
							float x8 = vector8.x;
							Vector3 diff5 = tween.diff;
							val = easeInOutQuadOpt(x8, diff5.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInCubic:
						{
							Vector3 vector35 = tween.from;
							float x35 = vector35.x;
							Vector3 to30 = tween.to;
							val = easeInCubic(x35, to30.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutCubic:
						{
							Vector3 vector34 = tween.from;
							float x34 = vector34.x;
							Vector3 to29 = tween.to;
							val = easeOutCubic(x34, to29.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutCubic:
						{
							Vector3 vector33 = tween.from;
							float x33 = vector33.x;
							Vector3 to28 = tween.to;
							val = easeInOutCubic(x33, to28.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInQuart:
						{
							Vector3 vector32 = tween.from;
							float x32 = vector32.x;
							Vector3 to27 = tween.to;
							val = easeInQuart(x32, to27.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutQuart:
						{
							Vector3 vector31 = tween.from;
							float x31 = vector31.x;
							Vector3 to26 = tween.to;
							val = easeOutQuart(x31, to26.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutQuart:
						{
							Vector3 vector30 = tween.from;
							float x30 = vector30.x;
							Vector3 to25 = tween.to;
							val = easeInOutQuart(x30, to25.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInQuint:
						{
							Vector3 vector29 = tween.from;
							float x29 = vector29.x;
							Vector3 to24 = tween.to;
							val = easeInQuint(x29, to24.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutQuint:
						{
							Vector3 vector28 = tween.from;
							float x28 = vector28.x;
							Vector3 to23 = tween.to;
							val = easeOutQuint(x28, to23.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutQuint:
						{
							Vector3 vector27 = tween.from;
							float x27 = vector27.x;
							Vector3 to22 = tween.to;
							val = easeInOutQuint(x27, to22.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInSine:
						{
							Vector3 vector26 = tween.from;
							float x26 = vector26.x;
							Vector3 to21 = tween.to;
							val = easeInSine(x26, to21.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutSine:
						{
							Vector3 vector25 = tween.from;
							float x25 = vector25.x;
							Vector3 to20 = tween.to;
							val = easeOutSine(x25, to20.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutSine:
						{
							Vector3 vector24 = tween.from;
							float x24 = vector24.x;
							Vector3 to19 = tween.to;
							val = easeInOutSine(x24, to19.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInExpo:
						{
							Vector3 vector23 = tween.from;
							float x23 = vector23.x;
							Vector3 to18 = tween.to;
							val = easeInExpo(x23, to18.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutExpo:
						{
							Vector3 vector22 = tween.from;
							float x22 = vector22.x;
							Vector3 to17 = tween.to;
							val = easeOutExpo(x22, to17.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutExpo:
						{
							Vector3 vector21 = tween.from;
							float x21 = vector21.x;
							Vector3 to16 = tween.to;
							val = easeInOutExpo(x21, to16.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInCirc:
						{
							Vector3 vector20 = tween.from;
							float x20 = vector20.x;
							Vector3 to15 = tween.to;
							val = easeInCirc(x20, to15.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutCirc:
						{
							Vector3 vector19 = tween.from;
							float x19 = vector19.x;
							Vector3 to14 = tween.to;
							val = easeOutCirc(x19, to14.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutCirc:
						{
							Vector3 vector18 = tween.from;
							float x18 = vector18.x;
							Vector3 to13 = tween.to;
							val = easeInOutCirc(x18, to13.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInBounce:
						{
							Vector3 vector17 = tween.from;
							float x17 = vector17.x;
							Vector3 to12 = tween.to;
							val = easeInBounce(x17, to12.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeOutBounce:
						{
							Vector3 vector16 = tween.from;
							float x16 = vector16.x;
							Vector3 to11 = tween.to;
							val = easeOutBounce(x16, to11.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInOutBounce:
						{
							Vector3 vector15 = tween.from;
							float x15 = vector15.x;
							Vector3 to10 = tween.to;
							val = easeInOutBounce(x15, to10.x, ratioPassed);
							break;
						}
						case LeanTweenType.easeInBack:
						{
							Vector3 vector14 = tween.from;
							float x14 = vector14.x;
							Vector3 to9 = tween.to;
							val = easeInBack(x14, to9.x, ratioPassed, tween.overshoot);
							break;
						}
						case LeanTweenType.easeOutBack:
						{
							Vector3 vector13 = tween.from;
							float x13 = vector13.x;
							Vector3 to8 = tween.to;
							val = easeOutBack(x13, to8.x, ratioPassed, tween.overshoot);
							break;
						}
						case LeanTweenType.easeInOutBack:
						{
							Vector3 vector12 = tween.from;
							float x12 = vector12.x;
							Vector3 to7 = tween.to;
							val = easeInOutBack(x12, to7.x, ratioPassed, tween.overshoot);
							break;
						}
						case LeanTweenType.easeInElastic:
						{
							Vector3 vector11 = tween.from;
							float x11 = vector11.x;
							Vector3 to6 = tween.to;
							val = easeInElastic(x11, to6.x, ratioPassed, tween.overshoot, tween.period);
							break;
						}
						case LeanTweenType.easeOutElastic:
						{
							Vector3 vector10 = tween.from;
							float x10 = vector10.x;
							Vector3 to5 = tween.to;
							val = easeOutElastic(x10, to5.x, ratioPassed, tween.overshoot, tween.period);
							break;
						}
						case LeanTweenType.easeInOutElastic:
						{
							Vector3 vector9 = tween.from;
							float x9 = vector9.x;
							Vector3 to4 = tween.to;
							val = easeInOutElastic(x9, to4.x, ratioPassed, tween.overshoot, tween.period);
							break;
						}
						case LeanTweenType.easeShake:
						case LeanTweenType.punch:
						{
							if (tween.tweenType == LeanTweenType.punch)
							{
								tween.animationCurve = punch;
							}
							else if (tween.tweenType == LeanTweenType.easeShake)
							{
								tween.animationCurve = shake;
							}
							ref Vector3 toInternal = ref tween.toInternal;
							Vector3 vector3 = tween.from;
							float x3 = vector3.x;
							Vector3 to2 = tween.to;
							toInternal.x = x3 + to2.x;
							ref Vector3 diffInternal = ref tween.diffInternal;
							Vector3 to3 = tween.to;
							float x4 = to3.x;
							Vector3 vector4 = tween.from;
							diffInternal.x = x4 - vector4.x;
							val = tweenOnCurve(tween, ratioPassed);
							break;
						}
						case LeanTweenType.easeSpring:
						{
							Vector3 vector2 = tween.from;
							float x2 = vector2.x;
							Vector3 to = tween.to;
							val = spring(x2, to.x, ratioPassed);
							break;
						}
						default:
						{
							Vector3 vector = tween.from;
							float x = vector.x;
							Vector3 diff = tween.diff;
							val = x + diff.x * ratioPassed;
							break;
						}
						}
					}
					if (tweenAction == TweenAction.MOVE_X)
					{
						Transform transform = trans;
						float x36 = val;
						Vector3 position = trans.position;
						float y = position.y;
						Vector3 position2 = trans.position;
						transform.position = new Vector3(x36, y, position2.z);
					}
					else if (tweenAction == TweenAction.MOVE_Y)
					{
						Transform transform2 = trans;
						Vector3 position3 = trans.position;
						float x37 = position3.x;
						float y2 = val;
						Vector3 position4 = trans.position;
						transform2.position = new Vector3(x37, y2, position4.z);
					}
					else if (tweenAction == TweenAction.MOVE_Z)
					{
						Transform transform3 = trans;
						Vector3 position5 = trans.position;
						float x38 = position5.x;
						Vector3 position6 = trans.position;
						transform3.position = new Vector3(x38, position6.y, val);
					}
					if (tweenAction == TweenAction.MOVE_LOCAL_X)
					{
						Transform transform4 = trans;
						float x39 = val;
						Vector3 localPosition = trans.localPosition;
						float y3 = localPosition.y;
						Vector3 localPosition2 = trans.localPosition;
						transform4.localPosition = new Vector3(x39, y3, localPosition2.z);
					}
					else if (tweenAction == TweenAction.MOVE_LOCAL_Y)
					{
						Transform transform5 = trans;
						Vector3 localPosition3 = trans.localPosition;
						float x40 = localPosition3.x;
						float y4 = val;
						Vector3 localPosition4 = trans.localPosition;
						transform5.localPosition = new Vector3(x40, y4, localPosition4.z);
					}
					else if (tweenAction == TweenAction.MOVE_LOCAL_Z)
					{
						Transform transform6 = trans;
						Vector3 localPosition5 = trans.localPosition;
						float x41 = localPosition5.x;
						Vector3 localPosition6 = trans.localPosition;
						transform6.localPosition = new Vector3(x41, localPosition6.y, val);
					}
					else if (tweenAction == TweenAction.MOVE_CURVED)
					{
						if (tween.path.orientToPath)
						{
							if (tween.path.orientToPath2d)
							{
								tween.path.place2d(trans, val);
							}
							else
							{
								tween.path.place(trans, val);
							}
						}
						else
						{
							trans.position = tween.path.point(val);
						}
					}
					else if (tweenAction == TweenAction.MOVE_CURVED_LOCAL)
					{
						if (tween.path.orientToPath)
						{
							if (tween.path.orientToPath2d)
							{
								tween.path.placeLocal2d(trans, val);
							}
							else
							{
								tween.path.placeLocal(trans, val);
							}
						}
						else
						{
							trans.localPosition = tween.path.point(val);
						}
					}
					else if (tweenAction == TweenAction.MOVE_SPLINE)
					{
						if (tween.spline.orientToPath)
						{
							if (tween.spline.orientToPath2d)
							{
								tween.spline.place2d(trans, val);
							}
							else
							{
								tween.spline.place(trans, val);
							}
						}
						else
						{
							trans.position = tween.spline.point(val);
						}
					}
					else if (tweenAction == TweenAction.MOVE_SPLINE_LOCAL)
					{
						if (tween.spline.orientToPath)
						{
							if (tween.spline.orientToPath2d)
							{
								tween.spline.placeLocal2d(trans, val);
							}
							else
							{
								tween.spline.placeLocal(trans, val);
							}
						}
						else
						{
							trans.localPosition = tween.spline.point(val);
						}
					}
					else if (tweenAction == TweenAction.SCALE_X)
					{
						Transform transform7 = trans;
						float x42 = val;
						Vector3 localScale = trans.localScale;
						float y5 = localScale.y;
						Vector3 localScale2 = trans.localScale;
						transform7.localScale = new Vector3(x42, y5, localScale2.z);
					}
					else if (tweenAction == TweenAction.SCALE_Y)
					{
						Transform transform8 = trans;
						Vector3 localScale3 = trans.localScale;
						float x43 = localScale3.x;
						float y6 = val;
						Vector3 localScale4 = trans.localScale;
						transform8.localScale = new Vector3(x43, y6, localScale4.z);
					}
					else if (tweenAction == TweenAction.SCALE_Z)
					{
						Transform transform9 = trans;
						Vector3 localScale5 = trans.localScale;
						float x44 = localScale5.x;
						Vector3 localScale6 = trans.localScale;
						transform9.localScale = new Vector3(x44, localScale6.y, val);
					}
					else if (tweenAction == TweenAction.ROTATE_X)
					{
						Transform transform10 = trans;
						float x45 = val;
						Vector3 eulerAngles = trans.eulerAngles;
						float y7 = eulerAngles.y;
						Vector3 eulerAngles2 = trans.eulerAngles;
						transform10.eulerAngles = new Vector3(x45, y7, eulerAngles2.z);
					}
					else if (tweenAction == TweenAction.ROTATE_Y)
					{
						Transform transform11 = trans;
						Vector3 eulerAngles3 = trans.eulerAngles;
						float x46 = eulerAngles3.x;
						float y8 = val;
						Vector3 eulerAngles4 = trans.eulerAngles;
						transform11.eulerAngles = new Vector3(x46, y8, eulerAngles4.z);
					}
					else if (tweenAction == TweenAction.ROTATE_Z)
					{
						Transform transform12 = trans;
						Vector3 eulerAngles5 = trans.eulerAngles;
						float x47 = eulerAngles5.x;
						Vector3 eulerAngles6 = trans.eulerAngles;
						transform12.eulerAngles = new Vector3(x47, eulerAngles6.y, val);
					}
					else if (tweenAction == TweenAction.ROTATE_AROUND)
					{
						Vector3 localPosition7 = trans.localPosition;
						Vector3 point = trans.TransformPoint(tween.point);
						trans.RotateAround(point, tween.axis, 0f - val);
						Vector3 b = localPosition7 - trans.localPosition;
						trans.localPosition = localPosition7 - b;
						trans.rotation = tween.origRotation;
						point = trans.TransformPoint(tween.point);
						trans.RotateAround(point, tween.axis, val);
					}
					else if (tweenAction == TweenAction.ROTATE_AROUND_LOCAL)
					{
						Vector3 localPosition8 = trans.localPosition;
						trans.RotateAround(trans.TransformPoint(tween.point), trans.TransformDirection(tween.axis), 0f - val);
						Vector3 b2 = localPosition8 - trans.localPosition;
						trans.localPosition = localPosition8 - b2;
						trans.localRotation = tween.origRotation;
						Vector3 point2 = trans.TransformPoint(tween.point);
						trans.RotateAround(point2, trans.TransformDirection(tween.axis), val);
					}
					else if (tweenAction == TweenAction.ALPHA)
					{
						if (tween.spriteRen != null)
						{
							SpriteRenderer spriteRen = tween.spriteRen;
							Color color = tween.spriteRen.color;
							float r = color.r;
							Color color2 = tween.spriteRen.color;
							float g = color2.g;
							Color color3 = tween.spriteRen.color;
							spriteRen.color = new Color(r, g, color3.b, val);
							alphaRecursiveSprite(tween.trans, val);
						}
						else
						{
							alphaRecursive(tween.trans, val, tween.useRecursion);
						}
					}
					else if (tweenAction == TweenAction.ALPHA_VERTEX)
					{
						Mesh mesh = trans.GetComponent<MeshFilter>().mesh;
						Vector3[] vertices = mesh.vertices;
						Color32[] array = new Color32[vertices.Length];
						Color32 color4 = mesh.colors32[0];
						color4 = new Color((int)color4.r, (int)color4.g, (int)color4.b, val);
						for (int j = 0; j < vertices.Length; j++)
						{
							array[j] = color4;
						}
						mesh.colors32 = array;
					}
					else if (tweenAction == TweenAction.COLOR || tweenAction == TweenAction.CALLBACK_COLOR)
					{
						Color color5 = tweenColor(tween, val);
						if (tween.spriteRen != null)
						{
							tween.spriteRen.color = color5;
							colorRecursiveSprite(trans, color5);
						}
						else if (tweenAction == TweenAction.COLOR)
						{
							colorRecursive(trans, color5, tween.useRecursion);
						}
						if (dt != 0f && tween.onUpdateColor != null)
						{
							tween.onUpdateColor(color5);
						}
						else if (dt != 0f && tween.onUpdateColorObject != null)
						{
							tween.onUpdateColorObject(color5, tween.onUpdateParam);
						}
					}
					else if (tweenAction == TweenAction.CANVAS_ALPHA)
					{
						if (tween.uiImage != null)
						{
							Color color6 = tween.uiImage.color;
							color6.a = val;
							tween.uiImage.color = color6;
						}
						if (tween.useRecursion)
						{
							alphaRecursive(tween.rectTransform, val);
							textAlphaRecursive(tween.rectTransform, val);
						}
					}
					else if (tweenAction == TweenAction.CANVAS_COLOR)
					{
						Color color7 = tweenColor(tween, val);
						tween.uiImage.color = color7;
						if (dt != 0f && tween.onUpdateColor != null)
						{
							tween.onUpdateColor(color7);
						}
						if (tween.useRecursion)
						{
							colorRecursive(tween.rectTransform, color7);
						}
					}
					else if (tweenAction == TweenAction.CANVASGROUP_ALPHA)
					{
						CanvasGroup component = tween.trans.GetComponent<CanvasGroup>();
						component.alpha = val;
					}
					else if (tweenAction == TweenAction.TEXT_ALPHA)
					{
						textAlphaRecursive(trans, val, tween.useRecursion);
					}
					else if (tweenAction == TweenAction.TEXT_COLOR)
					{
						Color color8 = tweenColor(tween, val);
						tween.uiText.color = color8;
						if (dt != 0f && tween.onUpdateColor != null)
						{
							tween.onUpdateColor(color8);
						}
						if (tween.useRecursion && trans.childCount > 0)
						{
							textColorRecursive(tween.trans, color8);
						}
					}
					else if (tweenAction == TweenAction.CANVAS_ROTATEAROUND)
					{
						RectTransform rectTransform = tween.rectTransform;
						Vector3 localPosition9 = rectTransform.localPosition;
						rectTransform.RotateAround(rectTransform.TransformPoint(tween.point), tween.axis, 0f - val);
						Vector3 b3 = localPosition9 - rectTransform.localPosition;
						rectTransform.localPosition = localPosition9 - b3;
						rectTransform.rotation = tween.origRotation;
						rectTransform.RotateAround(rectTransform.TransformPoint(tween.point), tween.axis, val);
					}
					else if (tweenAction == TweenAction.CANVAS_ROTATEAROUND_LOCAL)
					{
						RectTransform rectTransform2 = tween.rectTransform;
						Vector3 localPosition10 = rectTransform2.localPosition;
						rectTransform2.RotateAround(rectTransform2.TransformPoint(tween.point), rectTransform2.TransformDirection(tween.axis), 0f - val);
						Vector3 b4 = localPosition10 - rectTransform2.localPosition;
						rectTransform2.localPosition = localPosition10 - b4;
						rectTransform2.rotation = tween.origRotation;
						rectTransform2.RotateAround(rectTransform2.TransformPoint(tween.point), rectTransform2.TransformDirection(tween.axis), val);
					}
					else if (tweenAction == TweenAction.CANVAS_PLAYSPRITE)
					{
						int num = (int)Mathf.Round(val);
						tween.uiImage.sprite = tween.sprites[num];
					}
					else if (tweenAction == TweenAction.CANVAS_MOVE_X)
					{
						Vector3 anchoredPosition3D = tween.rectTransform.anchoredPosition3D;
						tween.rectTransform.anchoredPosition3D = new Vector3(val, anchoredPosition3D.y, anchoredPosition3D.z);
					}
					else if (tweenAction == TweenAction.CANVAS_MOVE_Y)
					{
						Vector3 anchoredPosition3D2 = tween.rectTransform.anchoredPosition3D;
						tween.rectTransform.anchoredPosition3D = new Vector3(anchoredPosition3D2.x, val, anchoredPosition3D2.z);
					}
					else if (tweenAction == TweenAction.CANVAS_MOVE_Z)
					{
						Vector3 anchoredPosition3D3 = tween.rectTransform.anchoredPosition3D;
						tween.rectTransform.anchoredPosition3D = new Vector3(anchoredPosition3D3.x, anchoredPosition3D3.y, val);
					}
				}
				else if (tweenAction >= TweenAction.MOVE)
				{
					if (tween.animationCurve != null)
					{
						newVect = tweenOnCurveVector(tween, ratioPassed);
					}
					else if (tween.tweenType == LeanTweenType.linear)
					{
						Vector3 vector36 = tween.from;
						float x48 = vector36.x;
						Vector3 diff6 = tween.diff;
						float x49 = x48 + diff6.x * ratioPassed;
						Vector3 vector37 = tween.from;
						float y9 = vector37.y;
						Vector3 diff7 = tween.diff;
						float y10 = y9 + diff7.y * ratioPassed;
						Vector3 vector38 = tween.from;
						float z = vector38.z;
						Vector3 diff8 = tween.diff;
						newVect = new Vector3(x49, y10, z + diff8.z * ratioPassed);
					}
					else if (tween.tweenType >= LeanTweenType.linear)
					{
						switch (tween.tweenType)
						{
						case LeanTweenType.easeOutQuad:
						{
							Vector3 vector57 = tween.from;
							float x62 = vector57.x;
							Vector3 diff9 = tween.diff;
							float x63 = easeOutQuadOpt(x62, diff9.x, ratioPassed);
							Vector3 vector58 = tween.from;
							float y23 = vector58.y;
							Vector3 diff10 = tween.diff;
							float y24 = easeOutQuadOpt(y23, diff10.y, ratioPassed);
							Vector3 vector59 = tween.from;
							float z8 = vector59.z;
							Vector3 diff11 = tween.diff;
							newVect = new Vector3(x63, y24, easeOutQuadOpt(z8, diff11.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInQuad:
						{
							Vector3 vector60 = tween.from;
							float x64 = vector60.x;
							Vector3 diff12 = tween.diff;
							float x65 = easeInQuadOpt(x64, diff12.x, ratioPassed);
							Vector3 vector61 = tween.from;
							float y25 = vector61.y;
							Vector3 diff13 = tween.diff;
							float y26 = easeInQuadOpt(y25, diff13.y, ratioPassed);
							Vector3 vector62 = tween.from;
							float z9 = vector62.z;
							Vector3 diff14 = tween.diff;
							newVect = new Vector3(x65, y26, easeInQuadOpt(z9, diff14.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutQuad:
						{
							Vector3 vector63 = tween.from;
							float x66 = vector63.x;
							Vector3 diff15 = tween.diff;
							float x67 = easeInOutQuadOpt(x66, diff15.x, ratioPassed);
							Vector3 vector64 = tween.from;
							float y27 = vector64.y;
							Vector3 diff16 = tween.diff;
							float y28 = easeInOutQuadOpt(y27, diff16.y, ratioPassed);
							Vector3 vector65 = tween.from;
							float z10 = vector65.z;
							Vector3 diff17 = tween.diff;
							newVect = new Vector3(x67, y28, easeInOutQuadOpt(z10, diff17.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInCubic:
						{
							Vector3 vector51 = tween.from;
							float x58 = vector51.x;
							Vector3 to43 = tween.to;
							float x59 = easeInCubic(x58, to43.x, ratioPassed);
							Vector3 vector52 = tween.from;
							float y19 = vector52.y;
							Vector3 to44 = tween.to;
							float y20 = easeInCubic(y19, to44.y, ratioPassed);
							Vector3 vector53 = tween.from;
							float z6 = vector53.z;
							Vector3 to45 = tween.to;
							newVect = new Vector3(x59, y20, easeInCubic(z6, to45.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutCubic:
						{
							Vector3 vector48 = tween.from;
							float x56 = vector48.x;
							Vector3 to40 = tween.to;
							float x57 = easeOutCubic(x56, to40.x, ratioPassed);
							Vector3 vector49 = tween.from;
							float y17 = vector49.y;
							Vector3 to41 = tween.to;
							float y18 = easeOutCubic(y17, to41.y, ratioPassed);
							Vector3 vector50 = tween.from;
							float z5 = vector50.z;
							Vector3 to42 = tween.to;
							newVect = new Vector3(x57, y18, easeOutCubic(z5, to42.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutCubic:
						{
							Vector3 vector45 = tween.from;
							float x54 = vector45.x;
							Vector3 to37 = tween.to;
							float x55 = easeInOutCubic(x54, to37.x, ratioPassed);
							Vector3 vector46 = tween.from;
							float y15 = vector46.y;
							Vector3 to38 = tween.to;
							float y16 = easeInOutCubic(y15, to38.y, ratioPassed);
							Vector3 vector47 = tween.from;
							float z4 = vector47.z;
							Vector3 to39 = tween.to;
							newVect = new Vector3(x55, y16, easeInOutCubic(z4, to39.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInQuart:
						{
							Vector3 vector54 = tween.from;
							float x60 = vector54.x;
							Vector3 to46 = tween.to;
							float x61 = easeInQuart(x60, to46.x, ratioPassed);
							Vector3 vector55 = tween.from;
							float y21 = vector55.y;
							Vector3 to47 = tween.to;
							float y22 = easeInQuart(y21, to47.y, ratioPassed);
							Vector3 vector56 = tween.from;
							float z7 = vector56.z;
							Vector3 to48 = tween.to;
							newVect = new Vector3(x61, y22, easeInQuart(z7, to48.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutQuart:
						{
							Vector3 vector132 = tween.from;
							float x112 = vector132.x;
							Vector3 to115 = tween.to;
							float x113 = easeOutQuart(x112, to115.x, ratioPassed);
							Vector3 vector133 = tween.from;
							float y73 = vector133.y;
							Vector3 to116 = tween.to;
							float y74 = easeOutQuart(y73, to116.y, ratioPassed);
							Vector3 vector134 = tween.from;
							float z33 = vector134.z;
							Vector3 to117 = tween.to;
							newVect = new Vector3(x113, y74, easeOutQuart(z33, to117.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutQuart:
						{
							Vector3 vector129 = tween.from;
							float x110 = vector129.x;
							Vector3 to112 = tween.to;
							float x111 = easeInOutQuart(x110, to112.x, ratioPassed);
							Vector3 vector130 = tween.from;
							float y71 = vector130.y;
							Vector3 to113 = tween.to;
							float y72 = easeInOutQuart(y71, to113.y, ratioPassed);
							Vector3 vector131 = tween.from;
							float z32 = vector131.z;
							Vector3 to114 = tween.to;
							newVect = new Vector3(x111, y72, easeInOutQuart(z32, to114.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInQuint:
						{
							Vector3 vector126 = tween.from;
							float x108 = vector126.x;
							Vector3 to109 = tween.to;
							float x109 = easeInQuint(x108, to109.x, ratioPassed);
							Vector3 vector127 = tween.from;
							float y69 = vector127.y;
							Vector3 to110 = tween.to;
							float y70 = easeInQuint(y69, to110.y, ratioPassed);
							Vector3 vector128 = tween.from;
							float z31 = vector128.z;
							Vector3 to111 = tween.to;
							newVect = new Vector3(x109, y70, easeInQuint(z31, to111.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutQuint:
						{
							Vector3 vector123 = tween.from;
							float x106 = vector123.x;
							Vector3 to106 = tween.to;
							float x107 = easeOutQuint(x106, to106.x, ratioPassed);
							Vector3 vector124 = tween.from;
							float y67 = vector124.y;
							Vector3 to107 = tween.to;
							float y68 = easeOutQuint(y67, to107.y, ratioPassed);
							Vector3 vector125 = tween.from;
							float z30 = vector125.z;
							Vector3 to108 = tween.to;
							newVect = new Vector3(x107, y68, easeOutQuint(z30, to108.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutQuint:
						{
							Vector3 vector120 = tween.from;
							float x104 = vector120.x;
							Vector3 to103 = tween.to;
							float x105 = easeInOutQuint(x104, to103.x, ratioPassed);
							Vector3 vector121 = tween.from;
							float y65 = vector121.y;
							Vector3 to104 = tween.to;
							float y66 = easeInOutQuint(y65, to104.y, ratioPassed);
							Vector3 vector122 = tween.from;
							float z29 = vector122.z;
							Vector3 to105 = tween.to;
							newVect = new Vector3(x105, y66, easeInOutQuint(z29, to105.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInSine:
						{
							Vector3 vector117 = tween.from;
							float x102 = vector117.x;
							Vector3 to100 = tween.to;
							float x103 = easeInSine(x102, to100.x, ratioPassed);
							Vector3 vector118 = tween.from;
							float y63 = vector118.y;
							Vector3 to101 = tween.to;
							float y64 = easeInSine(y63, to101.y, ratioPassed);
							Vector3 vector119 = tween.from;
							float z28 = vector119.z;
							Vector3 to102 = tween.to;
							newVect = new Vector3(x103, y64, easeInSine(z28, to102.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutSine:
						{
							Vector3 vector114 = tween.from;
							float x100 = vector114.x;
							Vector3 to97 = tween.to;
							float x101 = easeOutSine(x100, to97.x, ratioPassed);
							Vector3 vector115 = tween.from;
							float y61 = vector115.y;
							Vector3 to98 = tween.to;
							float y62 = easeOutSine(y61, to98.y, ratioPassed);
							Vector3 vector116 = tween.from;
							float z27 = vector116.z;
							Vector3 to99 = tween.to;
							newVect = new Vector3(x101, y62, easeOutSine(z27, to99.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutSine:
						{
							Vector3 vector111 = tween.from;
							float x98 = vector111.x;
							Vector3 to94 = tween.to;
							float x99 = easeInOutSine(x98, to94.x, ratioPassed);
							Vector3 vector112 = tween.from;
							float y59 = vector112.y;
							Vector3 to95 = tween.to;
							float y60 = easeInOutSine(y59, to95.y, ratioPassed);
							Vector3 vector113 = tween.from;
							float z26 = vector113.z;
							Vector3 to96 = tween.to;
							newVect = new Vector3(x99, y60, easeInOutSine(z26, to96.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInExpo:
						{
							Vector3 vector108 = tween.from;
							float x96 = vector108.x;
							Vector3 to91 = tween.to;
							float x97 = easeInExpo(x96, to91.x, ratioPassed);
							Vector3 vector109 = tween.from;
							float y57 = vector109.y;
							Vector3 to92 = tween.to;
							float y58 = easeInExpo(y57, to92.y, ratioPassed);
							Vector3 vector110 = tween.from;
							float z25 = vector110.z;
							Vector3 to93 = tween.to;
							newVect = new Vector3(x97, y58, easeInExpo(z25, to93.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutExpo:
						{
							Vector3 vector105 = tween.from;
							float x94 = vector105.x;
							Vector3 to88 = tween.to;
							float x95 = easeOutExpo(x94, to88.x, ratioPassed);
							Vector3 vector106 = tween.from;
							float y55 = vector106.y;
							Vector3 to89 = tween.to;
							float y56 = easeOutExpo(y55, to89.y, ratioPassed);
							Vector3 vector107 = tween.from;
							float z24 = vector107.z;
							Vector3 to90 = tween.to;
							newVect = new Vector3(x95, y56, easeOutExpo(z24, to90.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutExpo:
						{
							Vector3 vector102 = tween.from;
							float x92 = vector102.x;
							Vector3 to85 = tween.to;
							float x93 = easeInOutExpo(x92, to85.x, ratioPassed);
							Vector3 vector103 = tween.from;
							float y53 = vector103.y;
							Vector3 to86 = tween.to;
							float y54 = easeInOutExpo(y53, to86.y, ratioPassed);
							Vector3 vector104 = tween.from;
							float z23 = vector104.z;
							Vector3 to87 = tween.to;
							newVect = new Vector3(x93, y54, easeInOutExpo(z23, to87.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInCirc:
						{
							Vector3 vector99 = tween.from;
							float x90 = vector99.x;
							Vector3 to82 = tween.to;
							float x91 = easeInCirc(x90, to82.x, ratioPassed);
							Vector3 vector100 = tween.from;
							float y51 = vector100.y;
							Vector3 to83 = tween.to;
							float y52 = easeInCirc(y51, to83.y, ratioPassed);
							Vector3 vector101 = tween.from;
							float z22 = vector101.z;
							Vector3 to84 = tween.to;
							newVect = new Vector3(x91, y52, easeInCirc(z22, to84.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutCirc:
						{
							Vector3 vector96 = tween.from;
							float x88 = vector96.x;
							Vector3 to79 = tween.to;
							float x89 = easeOutCirc(x88, to79.x, ratioPassed);
							Vector3 vector97 = tween.from;
							float y49 = vector97.y;
							Vector3 to80 = tween.to;
							float y50 = easeOutCirc(y49, to80.y, ratioPassed);
							Vector3 vector98 = tween.from;
							float z21 = vector98.z;
							Vector3 to81 = tween.to;
							newVect = new Vector3(x89, y50, easeOutCirc(z21, to81.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutCirc:
						{
							Vector3 vector93 = tween.from;
							float x86 = vector93.x;
							Vector3 to76 = tween.to;
							float x87 = easeInOutCirc(x86, to76.x, ratioPassed);
							Vector3 vector94 = tween.from;
							float y47 = vector94.y;
							Vector3 to77 = tween.to;
							float y48 = easeInOutCirc(y47, to77.y, ratioPassed);
							Vector3 vector95 = tween.from;
							float z20 = vector95.z;
							Vector3 to78 = tween.to;
							newVect = new Vector3(x87, y48, easeInOutCirc(z20, to78.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInBounce:
						{
							Vector3 vector90 = tween.from;
							float x84 = vector90.x;
							Vector3 to73 = tween.to;
							float x85 = easeInBounce(x84, to73.x, ratioPassed);
							Vector3 vector91 = tween.from;
							float y45 = vector91.y;
							Vector3 to74 = tween.to;
							float y46 = easeInBounce(y45, to74.y, ratioPassed);
							Vector3 vector92 = tween.from;
							float z19 = vector92.z;
							Vector3 to75 = tween.to;
							newVect = new Vector3(x85, y46, easeInBounce(z19, to75.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeOutBounce:
						{
							Vector3 vector87 = tween.from;
							float x82 = vector87.x;
							Vector3 to70 = tween.to;
							float x83 = easeOutBounce(x82, to70.x, ratioPassed);
							Vector3 vector88 = tween.from;
							float y43 = vector88.y;
							Vector3 to71 = tween.to;
							float y44 = easeOutBounce(y43, to71.y, ratioPassed);
							Vector3 vector89 = tween.from;
							float z18 = vector89.z;
							Vector3 to72 = tween.to;
							newVect = new Vector3(x83, y44, easeOutBounce(z18, to72.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInOutBounce:
						{
							Vector3 vector84 = tween.from;
							float x80 = vector84.x;
							Vector3 to67 = tween.to;
							float x81 = easeInOutBounce(x80, to67.x, ratioPassed);
							Vector3 vector85 = tween.from;
							float y41 = vector85.y;
							Vector3 to68 = tween.to;
							float y42 = easeInOutBounce(y41, to68.y, ratioPassed);
							Vector3 vector86 = tween.from;
							float z17 = vector86.z;
							Vector3 to69 = tween.to;
							newVect = new Vector3(x81, y42, easeInOutBounce(z17, to69.z, ratioPassed));
							break;
						}
						case LeanTweenType.easeInBack:
						{
							Vector3 vector81 = tween.from;
							float x78 = vector81.x;
							Vector3 to64 = tween.to;
							float x79 = easeInBack(x78, to64.x, ratioPassed, tween.overshoot);
							Vector3 vector82 = tween.from;
							float y39 = vector82.y;
							Vector3 to65 = tween.to;
							float y40 = easeInBack(y39, to65.y, ratioPassed, tween.overshoot);
							Vector3 vector83 = tween.from;
							float z16 = vector83.z;
							Vector3 to66 = tween.to;
							newVect = new Vector3(x79, y40, easeInBack(z16, to66.z, ratioPassed, tween.overshoot));
							break;
						}
						case LeanTweenType.easeOutBack:
						{
							Vector3 vector78 = tween.from;
							float x76 = vector78.x;
							Vector3 to61 = tween.to;
							float x77 = easeOutBack(x76, to61.x, ratioPassed, tween.overshoot);
							Vector3 vector79 = tween.from;
							float y37 = vector79.y;
							Vector3 to62 = tween.to;
							float y38 = easeOutBack(y37, to62.y, ratioPassed, tween.overshoot);
							Vector3 vector80 = tween.from;
							float z15 = vector80.z;
							Vector3 to63 = tween.to;
							newVect = new Vector3(x77, y38, easeOutBack(z15, to63.z, ratioPassed, tween.overshoot));
							break;
						}
						case LeanTweenType.easeInOutBack:
						{
							Vector3 vector75 = tween.from;
							float x74 = vector75.x;
							Vector3 to58 = tween.to;
							float x75 = easeInOutBack(x74, to58.x, ratioPassed, tween.overshoot);
							Vector3 vector76 = tween.from;
							float y35 = vector76.y;
							Vector3 to59 = tween.to;
							float y36 = easeInOutBack(y35, to59.y, ratioPassed, tween.overshoot);
							Vector3 vector77 = tween.from;
							float z14 = vector77.z;
							Vector3 to60 = tween.to;
							newVect = new Vector3(x75, y36, easeInOutBack(z14, to60.z, ratioPassed, tween.overshoot));
							break;
						}
						case LeanTweenType.easeInElastic:
						{
							Vector3 vector72 = tween.from;
							float x72 = vector72.x;
							Vector3 to55 = tween.to;
							float x73 = easeInElastic(x72, to55.x, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector73 = tween.from;
							float y33 = vector73.y;
							Vector3 to56 = tween.to;
							float y34 = easeInElastic(y33, to56.y, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector74 = tween.from;
							float z13 = vector74.z;
							Vector3 to57 = tween.to;
							newVect = new Vector3(x73, y34, easeInElastic(z13, to57.z, ratioPassed, tween.overshoot, tween.period));
							break;
						}
						case LeanTweenType.easeOutElastic:
						{
							Vector3 vector69 = tween.from;
							float x70 = vector69.x;
							Vector3 to52 = tween.to;
							float x71 = easeOutElastic(x70, to52.x, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector70 = tween.from;
							float y31 = vector70.y;
							Vector3 to53 = tween.to;
							float y32 = easeOutElastic(y31, to53.y, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector71 = tween.from;
							float z12 = vector71.z;
							Vector3 to54 = tween.to;
							newVect = new Vector3(x71, y32, easeOutElastic(z12, to54.z, ratioPassed, tween.overshoot, tween.period));
							break;
						}
						case LeanTweenType.easeInOutElastic:
						{
							Vector3 vector66 = tween.from;
							float x68 = vector66.x;
							Vector3 to49 = tween.to;
							float x69 = easeInOutElastic(x68, to49.x, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector67 = tween.from;
							float y29 = vector67.y;
							Vector3 to50 = tween.to;
							float y30 = easeInOutElastic(y29, to50.y, ratioPassed, tween.overshoot, tween.period);
							Vector3 vector68 = tween.from;
							float z11 = vector68.z;
							Vector3 to51 = tween.to;
							newVect = new Vector3(x69, y30, easeInOutElastic(z11, to51.z, ratioPassed, tween.overshoot, tween.period));
							break;
						}
						case LeanTweenType.easeShake:
						case LeanTweenType.punch:
							if (tween.tweenType == LeanTweenType.punch)
							{
								tween.animationCurve = punch;
							}
							else if (tween.tweenType == LeanTweenType.easeShake)
							{
								tween.animationCurve = shake;
							}
							tween.toInternal = tween.from + tween.to;
							tween.diff = tween.to - tween.from;
							if (tweenAction == TweenAction.ROTATE || tweenAction == TweenAction.ROTATE_LOCAL)
							{
								LTDescrImpl lTDescrImpl = tween;
								Vector3 vector42 = tween.from;
								float x52 = vector42.x;
								Vector3 to34 = tween.to;
								float x53 = closestRot(x52, to34.x);
								Vector3 vector43 = tween.from;
								float y13 = vector43.y;
								Vector3 to35 = tween.to;
								float y14 = closestRot(y13, to35.y);
								Vector3 vector44 = tween.from;
								float z3 = vector44.z;
								Vector3 to36 = tween.to;
								lTDescrImpl.to = new Vector3(x53, y14, closestRot(z3, to36.z));
							}
							newVect = tweenOnCurveVector(tween, ratioPassed);
							break;
						case LeanTweenType.easeSpring:
						{
							Vector3 vector39 = tween.from;
							float x50 = vector39.x;
							Vector3 to31 = tween.to;
							float x51 = spring(x50, to31.x, ratioPassed);
							Vector3 vector40 = tween.from;
							float y11 = vector40.y;
							Vector3 to32 = tween.to;
							float y12 = spring(y11, to32.y, ratioPassed);
							Vector3 vector41 = tween.from;
							float z2 = vector41.z;
							Vector3 to33 = tween.to;
							newVect = new Vector3(x51, y12, spring(z2, to33.z, ratioPassed));
							break;
						}
						}
					}
					else
					{
						Vector3 vector135 = tween.from;
						float x114 = vector135.x;
						Vector3 diff18 = tween.diff;
						float x115 = x114 + diff18.x * ratioPassed;
						Vector3 vector136 = tween.from;
						float y75 = vector136.y;
						Vector3 diff19 = tween.diff;
						float y76 = y75 + diff19.y * ratioPassed;
						Vector3 vector137 = tween.from;
						float z34 = vector137.z;
						Vector3 diff20 = tween.diff;
						newVect = new Vector3(x115, y76, z34 + diff20.z * ratioPassed);
					}
					if (tweenAction == TweenAction.MOVE)
					{
						trans.position = newVect;
					}
					else if (tweenAction == TweenAction.MOVE_LOCAL)
					{
						trans.localPosition = newVect;
					}
					else if (tweenAction == TweenAction.MOVE_TO_TRANSFORM)
					{
						trans.position = newVect;
					}
					else if (tweenAction == TweenAction.ROTATE)
					{
						trans.eulerAngles = newVect;
					}
					else if (tweenAction == TweenAction.ROTATE_LOCAL)
					{
						trans.localEulerAngles = newVect;
					}
					else if (tweenAction == TweenAction.SCALE)
					{
						trans.localScale = newVect;
					}
					else if (tweenAction == TweenAction.GUI_MOVE)
					{
						tween.ltRect.rect = new Rect(newVect.x, newVect.y, tween.ltRect.rect.width, tween.ltRect.rect.height);
					}
					else if (tweenAction == TweenAction.GUI_MOVE_MARGIN)
					{
						tween.ltRect.margin = new Vector2(newVect.x, newVect.y);
					}
					else if (tweenAction == TweenAction.GUI_SCALE)
					{
						tween.ltRect.rect = new Rect(tween.ltRect.rect.x, tween.ltRect.rect.y, newVect.x, newVect.y);
					}
					else if (tweenAction == TweenAction.GUI_ALPHA)
					{
						tween.ltRect.alpha = newVect.x;
					}
					else if (tweenAction == TweenAction.GUI_ROTATE)
					{
						tween.ltRect.rotation = newVect.x;
					}
					else if (tweenAction == TweenAction.CANVAS_MOVE)
					{
						tween.rectTransform.anchoredPosition3D = newVect;
					}
					else if (tweenAction == TweenAction.CANVAS_SCALE)
					{
						tween.rectTransform.localScale = newVect;
					}
				}
				if (dt != 0f && tween.hasUpdateCallback)
				{
					if (tween.onUpdateFloat != null)
					{
						tween.onUpdateFloat(val);
					}
					if (tween.onUpdateFloatRatio != null)
					{
						tween.onUpdateFloatRatio(val, ratioPassed);
					}
					else if (tween.onUpdateFloatObject != null)
					{
						tween.onUpdateFloatObject(val, tween.onUpdateParam);
					}
					else if (tween.onUpdateVector3Object != null)
					{
						tween.onUpdateVector3Object(newVect, tween.onUpdateParam);
					}
					else if (tween.onUpdateVector3 != null)
					{
						tween.onUpdateVector3(newVect);
					}
					else if (tween.onUpdateVector2 != null)
					{
						tween.onUpdateVector2(new Vector2(newVect.x, newVect.y));
					}
				}
			}
			if (isTweenFinished)
			{
				if (tween.loopType == LeanTweenType.once || tween.loopCount == 1)
				{
					tweensFinished[finishedCnt] = i;
					finishedCnt++;
					if (tweenAction == TweenAction.GUI_ROTATE)
					{
						tween.ltRect.rotateFinished = true;
					}
					if (tweenAction == TweenAction.DELAYED_SOUND)
					{
						AudioClip clip = (AudioClip)tween.onCompleteParam;
						Vector3 to118 = tween.to;
						Vector3 vector138 = tween.from;
						AudioSource.PlayClipAtPoint(clip, to118, vector138.x);
					}
					continue;
				}
				if ((tween.loopCount < 0 && tween.type == TweenAction.CALLBACK) || tween.onCompleteOnRepeat)
				{
					if (tweenAction == TweenAction.DELAYED_SOUND)
					{
						AudioClip clip2 = (AudioClip)tween.onCompleteParam;
						Vector3 to119 = tween.to;
						Vector3 vector139 = tween.from;
						AudioSource.PlayClipAtPoint(clip2, to119, vector139.x);
					}
					if (tween.onComplete != null)
					{
						tween.onComplete();
					}
					else if (tween.onCompleteObject != null)
					{
						tween.onCompleteObject(tween.onCompleteParam);
					}
				}
				if (tween.loopCount >= 1)
				{
					tween.loopCount--;
				}
				if (tween.loopType == LeanTweenType.pingPong)
				{
					tween.direction = 0f - tween.direction;
				}
				else
				{
					tween.passed = Mathf.Epsilon;
				}
			}
			else if (tween.delay <= 0f)
			{
				tween.passed += dt * tween.direction;
			}
			else
			{
				tween.delay -= dt;
				if (tween.delay < 0f)
				{
					tween.passed = 0f;
					tween.delay = 0f;
				}
			}
		}
		tweenMaxSearch = maxTweenReached;
		frameRendered = Time.frameCount;
		for (int k = 0; k < finishedCnt; k++)
		{
			LeanTween.j = tweensFinished[k];
			tween = tweens[LeanTween.j];
			if (tween.onComplete != null)
			{
				Action onComplete = tween.onComplete;
				removeTween(LeanTween.j);
				onComplete();
			}
			else if (tween.onCompleteObject != null)
			{
				Action<object> onCompleteObject = tween.onCompleteObject;
				object onCompleteParam = tween.onCompleteParam;
				removeTween(LeanTween.j);
				onCompleteObject(onCompleteParam);
			}
			else
			{
				removeTween(LeanTween.j);
			}
		}
	}

	private static void alphaRecursive(Transform transform, float val, bool useRecursion = true)
	{
		Renderer component = transform.gameObject.GetComponent<Renderer>();
		if (component != null)
		{
			Material[] materials = component.materials;
			foreach (Material material in materials)
			{
				if (material.HasProperty("_Color"))
				{
					Material material2 = material;
					Color color = material.color;
					float r = color.r;
					Color color2 = material.color;
					float g = color2.g;
					Color color3 = material.color;
					material2.color = new Color(r, g, color3.b, val);
				}
				else if (material.HasProperty("_TintColor"))
				{
					Color color4 = material.GetColor("_TintColor");
					material.SetColor("_TintColor", new Color(color4.r, color4.g, color4.b, val));
				}
			}
		}
		if (useRecursion && transform.childCount > 0)
		{
			IEnumerator enumerator = transform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform2 = (Transform)enumerator.Current;
					alphaRecursive(transform2, val);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void colorRecursive(Transform transform, Color toColor, bool useRecursion = true)
	{
		Renderer component = transform.gameObject.GetComponent<Renderer>();
		if (component != null)
		{
			Material[] materials = component.materials;
			foreach (Material material in materials)
			{
				material.color = toColor;
			}
		}
		if (useRecursion && transform.childCount > 0)
		{
			IEnumerator enumerator = transform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform2 = (Transform)enumerator.Current;
					colorRecursive(transform2, toColor);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void alphaRecursive(RectTransform rectTransform, float val, int recursiveLevel = 0)
	{
		if (rectTransform.childCount > 0)
		{
			IEnumerator enumerator = rectTransform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					RectTransform rectTransform2 = (RectTransform)enumerator.Current;
					Image component = rectTransform2.GetComponent<Image>();
					if (component != null)
					{
						Color color = component.color;
						color.a = val;
						component.color = color;
					}
					alphaRecursive(rectTransform2, val, recursiveLevel + 1);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void alphaRecursiveSprite(Transform transform, float val)
	{
		if (transform.childCount > 0)
		{
			IEnumerator enumerator = transform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform2 = (Transform)enumerator.Current;
					SpriteRenderer component = transform2.GetComponent<SpriteRenderer>();
					if (component != null)
					{
						SpriteRenderer spriteRenderer = component;
						Color color = component.color;
						float r = color.r;
						Color color2 = component.color;
						float g = color2.g;
						Color color3 = component.color;
						spriteRenderer.color = new Color(r, g, color3.b, val);
					}
					alphaRecursiveSprite(transform2, val);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void colorRecursiveSprite(Transform transform, Color toColor)
	{
		if (transform.childCount > 0)
		{
			IEnumerator enumerator = transform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform2 = (Transform)enumerator.Current;
					SpriteRenderer component = trans.gameObject.GetComponent<SpriteRenderer>();
					if (component != null)
					{
						component.color = toColor;
					}
					colorRecursiveSprite(transform2, toColor);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void colorRecursive(RectTransform rectTransform, Color toColor)
	{
		if (rectTransform.childCount > 0)
		{
			IEnumerator enumerator = rectTransform.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					RectTransform rectTransform2 = (RectTransform)enumerator.Current;
					Image component = rectTransform2.GetComponent<Image>();
					if (component != null)
					{
						component.color = toColor;
					}
					colorRecursive(rectTransform2, toColor);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void textAlphaRecursive(Transform trans, float val, bool useRecursion = true)
	{
		Text component = trans.gameObject.GetComponent<Text>();
		if (component != null)
		{
			Color color = component.color;
			color.a = val;
			component.color = color;
		}
		if (useRecursion && trans.childCount > 0)
		{
			IEnumerator enumerator = trans.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform = (Transform)enumerator.Current;
					textAlphaRecursive(transform, val);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static void textColorRecursive(Transform trans, Color toColor)
	{
		if (trans.childCount > 0)
		{
			IEnumerator enumerator = trans.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					Transform transform = (Transform)enumerator.Current;
					Text component = transform.gameObject.GetComponent<Text>();
					if (component != null)
					{
						component.color = toColor;
					}
					textColorRecursive(transform, toColor);
				}
			}
			finally
			{
				IDisposable disposable;
				if ((disposable = (enumerator as IDisposable)) != null)
				{
					disposable.Dispose();
				}
			}
		}
	}

	private static Color tweenColor(LTDescrImpl tween, float val)
	{
		Vector3 vector = tween.point - tween.axis;
		Vector3 to = tween.to;
		float y = to.y;
		Vector3 vector2 = tween.from;
		float num = y - vector2.y;
		Vector3 axis = tween.axis;
		float r = axis.x + vector.x * val;
		Vector3 axis2 = tween.axis;
		float g = axis2.y + vector.y * val;
		Vector3 axis3 = tween.axis;
		float b = axis3.z + vector.z * val;
		Vector3 vector3 = tween.from;
		return new Color(r, g, b, vector3.y + num * val);
	}

	public static void removeTween(int i, int uniqueId)
	{
		if (tweens[i].uniqueId == uniqueId)
		{
			removeTween(i);
		}
	}

	public static void removeTween(int i)
	{
		if (!tweens[i].toggle)
		{
			return;
		}
		tweens[i].toggle = false;
		if (tweens[i].destroyOnComplete)
		{
			if (tweens[i].ltRect != null)
			{
				LTGUI.destroy(tweens[i].ltRect.id);
			}
			else if (tweens[i].trans != null && tweens[i].trans.gameObject != _tweenEmpty)
			{
				UnityEngine.Object.Destroy(tweens[i].trans.gameObject);
			}
		}
		tweens[i].cleanup();
		startSearch = i;
		if (i + 1 >= tweenMaxSearch)
		{
			startSearch = 0;
		}
	}

	public static Vector3[] add(Vector3[] a, Vector3 b)
	{
		Vector3[] array = new Vector3[a.Length];
		for (i = 0; i < a.Length; i++)
		{
			array[i] = a[i] + b;
		}
		return array;
	}

	public static float closestRot(float from, float to)
	{
		float num = 0f - (360f - to);
		float num2 = 360f + to;
		float num3 = Mathf.Abs(to - from);
		float num4 = Mathf.Abs(num - from);
		float num5 = Mathf.Abs(num2 - from);
		if (num3 < num4 && num3 < num5)
		{
			return to;
		}
		if (num4 < num5)
		{
			return num;
		}
		return num2;
	}

	public static void cancelAll()
	{
		cancelAll(callComplete: false);
	}

	public static void cancelAll(bool callComplete)
	{
		init();
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].trans != null)
			{
				if (callComplete && tweens[i].onComplete != null)
				{
					tweens[i].onComplete();
				}
				removeTween(i);
			}
		}
	}

	public static void cancel(GameObject gameObject)
	{
		cancel(gameObject, callOnComplete: false);
	}

	public static void cancel(GameObject gameObject, bool callOnComplete)
	{
		init();
		Transform transform = gameObject.transform;
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].toggle && tweens[i].trans == transform)
			{
				if (callOnComplete && tweens[i].onComplete != null)
				{
					tweens[i].onComplete();
				}
				removeTween(i);
			}
		}
	}

	public static void cancel(GameObject gameObject, int uniqueId)
	{
		if (uniqueId >= 0)
		{
			init();
			int num = uniqueId & 0xFFFF;
			int num2 = uniqueId >> 16;
			if (tweens[num].trans == null || (tweens[num].trans.gameObject == gameObject && tweens[num].counter == num2))
			{
				removeTween(num);
			}
		}
	}

	public static void cancel(LTRect ltRect, int uniqueId)
	{
		if (uniqueId >= 0)
		{
			init();
			int num = uniqueId & 0xFFFF;
			int num2 = uniqueId >> 16;
			if (tweens[num].ltRect == ltRect && tweens[num].counter == num2)
			{
				removeTween(num);
			}
		}
	}

	public static void cancel(int uniqueId)
	{
		cancel(uniqueId, callOnComplete: false);
	}

	public static void cancel(int uniqueId, bool callOnComplete)
	{
		if (uniqueId < 0)
		{
			return;
		}
		init();
		int num = uniqueId & 0xFFFF;
		int num2 = uniqueId >> 16;
		if (tweens[num].counter == num2)
		{
			if (callOnComplete && tweens[num].onComplete != null)
			{
				tweens[num].onComplete();
			}
			removeTween(num);
		}
	}

	public static LTDescr descr(int uniqueId)
	{
		int num = uniqueId & 0xFFFF;
		int num2 = uniqueId >> 16;
		if (tweens[num] != null && tweens[num].uniqueId == uniqueId && tweens[num].counter == num2)
		{
			return tweens[num];
		}
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].uniqueId == uniqueId && tweens[i].counter == num2)
			{
				return tweens[i];
			}
		}
		return null;
	}

	public static LTDescr description(int uniqueId)
	{
		return descr(uniqueId);
	}

	public static LTDescr[] descriptions(GameObject gameObject = null)
	{
		if (gameObject == null)
		{
			return null;
		}
		List<LTDescr> list = new List<LTDescr>();
		Transform transform = gameObject.transform;
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].toggle && tweens[i].trans == transform)
			{
				list.Add(tweens[i]);
			}
		}
		return list.ToArray();
	}

	[Obsolete("Use 'pause( id )' instead")]
	public static void pause(GameObject gameObject, int uniqueId)
	{
		pause(uniqueId);
	}

	public static void pause(int uniqueId)
	{
		int num = uniqueId & 0xFFFF;
		int num2 = uniqueId >> 16;
		if (tweens[num].counter == num2)
		{
			tweens[num].pause();
		}
	}

	public static void pause(GameObject gameObject)
	{
		Transform transform = gameObject.transform;
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].trans == transform)
			{
				tweens[i].pause();
			}
		}
	}

	public static void pauseAll()
	{
		init();
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			tweens[i].pause();
		}
	}

	public static void resumeAll()
	{
		init();
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			tweens[i].resume();
		}
	}

	[Obsolete("Use 'resume( id )' instead")]
	public static void resume(GameObject gameObject, int uniqueId)
	{
		resume(uniqueId);
	}

	public static void resume(int uniqueId)
	{
		int num = uniqueId & 0xFFFF;
		int num2 = uniqueId >> 16;
		if (tweens[num].counter == num2)
		{
			tweens[num].resume();
		}
	}

	public static void resume(GameObject gameObject)
	{
		Transform transform = gameObject.transform;
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].trans == transform)
			{
				tweens[i].resume();
			}
		}
	}

	public static bool isTweening(GameObject gameObject = null)
	{
		if (gameObject == null)
		{
			for (int i = 0; i <= tweenMaxSearch; i++)
			{
				if (tweens[i].toggle)
				{
					return true;
				}
			}
			return false;
		}
		Transform transform = gameObject.transform;
		for (int j = 0; j <= tweenMaxSearch; j++)
		{
			if (tweens[j].toggle && tweens[j].trans == transform)
			{
				return true;
			}
		}
		return false;
	}

	public static bool isTweening(int uniqueId)
	{
		int num = uniqueId & 0xFFFF;
		int num2 = uniqueId >> 16;
		if (num < 0 || num >= maxTweens)
		{
			return false;
		}
		if (tweens[num].counter == num2 && tweens[num].toggle)
		{
			return true;
		}
		return false;
	}

	public static bool isTweening(LTRect ltRect)
	{
		for (int i = 0; i <= tweenMaxSearch; i++)
		{
			if (tweens[i].toggle && tweens[i].ltRect == ltRect)
			{
				return true;
			}
		}
		return false;
	}

	public static void drawBezierPath(Vector3 a, Vector3 b, Vector3 c, Vector3 d, float arrowSize = 0f, Transform arrowTransform = null)
	{
		Vector3 vector = a;
		Vector3 a2 = -a + 3f * (b - c) + d;
		Vector3 b2 = 3f * (a + c) - 6f * b;
		Vector3 b3 = 3f * (b - a);
		if (arrowSize > 0f)
		{
			Vector3 position = arrowTransform.position;
			Quaternion rotation = arrowTransform.rotation;
			float num = 0f;
			for (float num2 = 1f; num2 <= 120f; num2 += 1f)
			{
				float num3 = num2 / 120f;
				Vector3 vector2 = ((a2 * num3 + b2) * num3 + b3) * num3 + a;
				Gizmos.DrawLine(vector, vector2);
				num += (vector2 - vector).magnitude;
				if (num > 1f)
				{
					num -= 1f;
					arrowTransform.position = vector2;
					arrowTransform.LookAt(vector, Vector3.forward);
					Vector3 a3 = arrowTransform.TransformDirection(Vector3.right);
					Vector3 normalized = (vector - vector2).normalized;
					Gizmos.DrawLine(vector2, vector2 + (a3 + normalized) * arrowSize);
					a3 = arrowTransform.TransformDirection(-Vector3.right);
					Gizmos.DrawLine(vector2, vector2 + (a3 + normalized) * arrowSize);
				}
				vector = vector2;
			}
			arrowTransform.position = position;
			arrowTransform.rotation = rotation;
		}
		else
		{
			for (float num4 = 1f; num4 <= 30f; num4 += 1f)
			{
				float num3 = num4 / 30f;
				Vector3 vector2 = ((a2 * num3 + b2) * num3 + b3) * num3 + a;
				Gizmos.DrawLine(vector, vector2);
				vector = vector2;
			}
		}
	}

	public static object logError(string error)
	{
		if (throwErrors)
		{
			UnityEngine.Debug.LogError(error);
		}
		else
		{
			UnityEngine.Debug.Log(error);
		}
		return null;
	}

	public static LTDescr options(LTDescr seed)
	{
		UnityEngine.Debug.LogError("error this function is no longer used");
		return null;
	}

	public static LTDescr options()
	{
		init();
		bool flag = false;
		j = 0;
		i = startSearch;
		while (j < maxTweens)
		{
			if (i >= maxTweens - 1)
			{
				i = 0;
			}
			if (!tweens[i].toggle)
			{
				if (i + 1 > tweenMaxSearch)
				{
					tweenMaxSearch = i + 1;
				}
				startSearch = i + 1;
				flag = true;
				break;
			}
			j++;
			if (j >= maxTweens)
			{
				return logError("LeanTween - You have run out of available spaces for tweening. To avoid this error increase the number of spaces to available for tweening when you initialize the LeanTween class ex: LeanTween.init( " + maxTweens * 2 + " );") as LTDescr;
			}
			i++;
		}
		if (!flag)
		{
			logError("no available tween found!");
		}
		tweens[i].reset();
		tweens[i].setId((uint)i);
		return tweens[i];
	}

	private static LTDescr pushNewTween(GameObject gameObject, Vector3 to, float time, TweenAction tweenAction, LTDescr tween)
	{
		init(maxTweens);
		if (gameObject == null || tween == null)
		{
			return null;
		}
		tween.trans = gameObject.transform;
		tween.to = to;
		tween.time = time;
		tween.type = tweenAction;
		return tween;
	}

	public static LTDescr play(RectTransform rectTransform, Sprite[] sprites)
	{
		float num = 0.25f;
		float time = num * (float)sprites.Length;
		return pushNewTween(rectTransform.gameObject, new Vector3((float)sprites.Length - 1f, 0f, 0f), time, TweenAction.CANVAS_PLAYSPRITE, options().setSprites(sprites).setRepeat(-1));
	}

	public static LTDescr alpha(GameObject gameObject, float to, float time)
	{
		LTDescr lTDescr = pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.ALPHA, options());
		SpriteRenderer spriteRenderer = lTDescr.spriteRen = gameObject.GetComponent<SpriteRenderer>();
		return lTDescr;
	}

	public static LTDescr alpha(LTRect ltRect, float to, float time)
	{
		ltRect.alphaEnabled = true;
		return pushNewTween(tweenEmpty, new Vector3(to, 0f, 0f), time, TweenAction.GUI_ALPHA, options().setRect(ltRect));
	}

	public static LTDescr textAlpha(RectTransform rectTransform, float to, float time)
	{
		return pushNewTween(rectTransform.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.TEXT_ALPHA, options());
	}

	public static LTDescr alphaText(RectTransform rectTransform, float to, float time)
	{
		return pushNewTween(rectTransform.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.TEXT_ALPHA, options());
	}

	public static LTDescr alphaCanvas(CanvasGroup canvasGroup, float to, float time)
	{
		return pushNewTween(canvasGroup.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVASGROUP_ALPHA, options());
	}

	public static LTDescr alphaVertex(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.ALPHA_VERTEX, options());
	}

	public static LTDescr color(GameObject gameObject, Color to, float time)
	{
		LTDescr lTDescr = pushNewTween(gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)));
		SpriteRenderer spriteRenderer = lTDescr.spriteRen = gameObject.GetComponent<SpriteRenderer>();
		return lTDescr;
	}

	public static LTDescr textColor(RectTransform rectTransform, Color to, float time)
	{
		return pushNewTween(rectTransform.gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.TEXT_COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)));
	}

	public static LTDescr colorText(RectTransform rectTransform, Color to, float time)
	{
		return pushNewTween(rectTransform.gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.TEXT_COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)));
	}

	public static LTDescr delayedCall(float delayTime, Action callback)
	{
		return pushNewTween(tweenEmpty, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setOnComplete(callback));
	}

	public static LTDescr delayedCall(float delayTime, Action<object> callback)
	{
		return pushNewTween(tweenEmpty, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setOnComplete(callback));
	}

	public static LTDescr delayedCall(GameObject gameObject, float delayTime, Action callback)
	{
		return pushNewTween(gameObject, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setOnComplete(callback));
	}

	public static LTDescr delayedCall(GameObject gameObject, float delayTime, Action<object> callback)
	{
		return pushNewTween(gameObject, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setOnComplete(callback));
	}

	public static LTDescr destroyAfter(LTRect rect, float delayTime)
	{
		return pushNewTween(tweenEmpty, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setRect(rect).setDestroyOnComplete(doesDestroy: true));
	}

	public static LTDescr move(GameObject gameObject, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.MOVE, options());
	}

	public static LTDescr move(GameObject gameObject, Vector2 to, float time)
	{
		float x = to.x;
		float y = to.y;
		Vector3 position = gameObject.transform.position;
		return pushNewTween(gameObject, new Vector3(x, y, position.z), time, TweenAction.MOVE, options());
	}

	public static LTDescr move(GameObject gameObject, Vector3[] to, float time)
	{
		d = options();
		if (d.path == null)
		{
			d.path = new LTBezierPath(to);
		}
		else
		{
			d.path.setPoints(to);
		}
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_CURVED, d);
	}

	public static LTDescr move(GameObject gameObject, LTBezierPath to, float time)
	{
		d = options();
		d.path = to;
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_CURVED, d);
	}

	public static LTDescr move(GameObject gameObject, LTSpline to, float time)
	{
		d = options();
		d.spline = to;
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_SPLINE, d);
	}

	public static LTDescr moveSpline(GameObject gameObject, Vector3[] to, float time)
	{
		d = options();
		d.spline = new LTSpline(to);
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_SPLINE, d);
	}

	public static LTDescr moveSpline(GameObject gameObject, LTSpline to, float time)
	{
		d = options();
		d.spline = to;
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_SPLINE, d);
	}

	public static LTDescr moveSplineLocal(GameObject gameObject, Vector3[] to, float time)
	{
		d = options();
		d.spline = new LTSpline(to);
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_SPLINE_LOCAL, d);
	}

	public static LTDescr move(LTRect ltRect, Vector2 to, float time)
	{
		return pushNewTween(tweenEmpty, to, time, TweenAction.GUI_MOVE, options().setRect(ltRect));
	}

	public static LTDescr moveMargin(LTRect ltRect, Vector2 to, float time)
	{
		return pushNewTween(tweenEmpty, to, time, TweenAction.GUI_MOVE_MARGIN, options().setRect(ltRect));
	}

	public static LTDescr moveX(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_X, options());
	}

	public static LTDescr moveY(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_Y, options());
	}

	public static LTDescr moveZ(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_Z, options());
	}

	public static LTDescr moveLocal(GameObject gameObject, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.MOVE_LOCAL, options());
	}

	public static LTDescr moveLocal(GameObject gameObject, Vector3[] to, float time)
	{
		d = options();
		if (d.path == null)
		{
			d.path = new LTBezierPath(to);
		}
		else
		{
			d.path.setPoints(to);
		}
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_CURVED_LOCAL, d);
	}

	public static LTDescr moveLocalX(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_LOCAL_X, options());
	}

	public static LTDescr moveLocalY(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_LOCAL_Y, options());
	}

	public static LTDescr moveLocalZ(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.MOVE_LOCAL_Z, options());
	}

	public static LTDescr moveLocal(GameObject gameObject, LTBezierPath to, float time)
	{
		d = options();
		d.path = to;
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_CURVED_LOCAL, d);
	}

	public static LTDescr moveLocal(GameObject gameObject, LTSpline to, float time)
	{
		d = options();
		d.spline = to;
		return pushNewTween(gameObject, new Vector3(1f, 0f, 0f), time, TweenAction.MOVE_SPLINE_LOCAL, d);
	}

	public static LTDescr move(GameObject gameObject, Transform to, float time)
	{
		return pushNewTween(gameObject, Vector3.zero, time, TweenAction.MOVE_TO_TRANSFORM, options().setTo(to));
	}

	public static LTDescr rotate(GameObject gameObject, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.ROTATE, options());
	}

	public static LTDescr rotate(LTRect ltRect, float to, float time)
	{
		return pushNewTween(tweenEmpty, new Vector3(to, 0f, 0f), time, TweenAction.GUI_ROTATE, options().setRect(ltRect));
	}

	public static LTDescr rotateLocal(GameObject gameObject, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.ROTATE_LOCAL, options());
	}

	public static LTDescr rotateX(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.ROTATE_X, options());
	}

	public static LTDescr rotateY(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.ROTATE_Y, options());
	}

	public static LTDescr rotateZ(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.ROTATE_Z, options());
	}

	public static LTDescr rotateAround(GameObject gameObject, Vector3 axis, float add, float time)
	{
		return pushNewTween(gameObject, new Vector3(add, 0f, 0f), time, TweenAction.ROTATE_AROUND, options().setAxis(axis));
	}

	public static LTDescr rotateAroundLocal(GameObject gameObject, Vector3 axis, float add, float time)
	{
		return pushNewTween(gameObject, new Vector3(add, 0f, 0f), time, TweenAction.ROTATE_AROUND_LOCAL, options().setAxis(axis));
	}

	public static LTDescr scale(GameObject gameObject, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.SCALE, options());
	}

	public static LTDescr scale(LTRect ltRect, Vector2 to, float time)
	{
		return pushNewTween(tweenEmpty, to, time, TweenAction.GUI_SCALE, options().setRect(ltRect));
	}

	public static LTDescr scaleX(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.SCALE_X, options());
	}

	public static LTDescr scaleY(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.SCALE_Y, options());
	}

	public static LTDescr scaleZ(GameObject gameObject, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.SCALE_Z, options());
	}

	public static LTDescr value(GameObject gameObject, float from, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CALLBACK, options().setFrom(new Vector3(from, 0f, 0f)));
	}

	public static LTDescr value(GameObject gameObject, Vector2 from, Vector2 to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to.x, to.y, 0f), time, TweenAction.VALUE3, options().setTo(new Vector3(to.x, to.y, 0f)).setFrom(new Vector3(from.x, from.y, 0f)));
	}

	public static LTDescr value(GameObject gameObject, Vector3 from, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.VALUE3, options().setFrom(from));
	}

	public static LTDescr value(GameObject gameObject, Color from, Color to, float time)
	{
		LTDescr lTDescr = pushNewTween(gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.CALLBACK_COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)).setFromColor(from).setHasInitialized(has: false));
		SpriteRenderer spriteRenderer = lTDescr.spriteRen = gameObject.GetComponent<SpriteRenderer>();
		return lTDescr;
	}

	public static LTDescr value(GameObject gameObject, Action<float> callOnUpdate, float from, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CALLBACK, options().setTo(new Vector3(to, 0f, 0f)).setFrom(new Vector3(from, 0f, 0f)).setOnUpdate(callOnUpdate));
	}

	public static LTDescr value(GameObject gameObject, Action<float, float> callOnUpdateRatio, float from, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CALLBACK, options().setTo(new Vector3(to, 0f, 0f)).setFrom(new Vector3(from, 0f, 0f)).setOnUpdateRatio(callOnUpdateRatio));
	}

	public static LTDescr value(GameObject gameObject, Action<Color> callOnUpdate, Color from, Color to, float time)
	{
		return pushNewTween(gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.CALLBACK_COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)).setAxis(new Vector3(from.r, from.g, from.b)).setFrom(new Vector3(0f, from.a, 0f))
			.setHasInitialized(has: false)
			.setOnUpdateColor(callOnUpdate));
	}

	public static LTDescr value(GameObject gameObject, Action<Color, object> callOnUpdate, Color from, Color to, float time)
	{
		return pushNewTween(gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.CALLBACK_COLOR, options().setPoint(new Vector3(to.r, to.g, to.b)).setAxis(new Vector3(from.r, from.g, from.b)).setFrom(new Vector3(0f, from.a, 0f))
			.setHasInitialized(has: false)
			.setOnUpdateColor(callOnUpdate));
	}

	public static LTDescr value(GameObject gameObject, Action<Vector2> callOnUpdate, Vector2 from, Vector2 to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to.x, to.y, 0f), time, TweenAction.VALUE3, options().setTo(new Vector3(to.x, to.y, 0f)).setFrom(new Vector3(from.x, from.y, 0f)).setOnUpdateVector2(callOnUpdate));
	}

	public static LTDescr value(GameObject gameObject, Action<Vector3> callOnUpdate, Vector3 from, Vector3 to, float time)
	{
		return pushNewTween(gameObject, to, time, TweenAction.VALUE3, options().setTo(to).setFrom(from).setOnUpdateVector3(callOnUpdate));
	}

	public static LTDescr value(GameObject gameObject, Action<float, object> callOnUpdate, float from, float to, float time)
	{
		return pushNewTween(gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CALLBACK, options().setTo(new Vector3(to, 0f, 0f)).setFrom(new Vector3(from, 0f, 0f)).setOnUpdate(callOnUpdate, gameObject));
	}

	public static LTDescr delayedSound(AudioClip audio, Vector3 pos, float volume)
	{
		return pushNewTween(tweenEmpty, pos, 0f, TweenAction.DELAYED_SOUND, options().setTo(pos).setFrom(new Vector3(volume, 0f, 0f)).setAudio(audio));
	}

	public static LTDescr delayedSound(GameObject gameObject, AudioClip audio, Vector3 pos, float volume)
	{
		return pushNewTween(gameObject, pos, 0f, TweenAction.DELAYED_SOUND, options().setTo(pos).setFrom(new Vector3(volume, 0f, 0f)).setAudio(audio));
	}

	public static LTDescr move(RectTransform rectTrans, Vector3 to, float time)
	{
		return pushNewTween(rectTrans.gameObject, to, time, TweenAction.CANVAS_MOVE, options().setRect(rectTrans));
	}

	public static LTDescr moveX(RectTransform rectTrans, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_MOVE_X, options().setRect(rectTrans));
	}

	public static LTDescr moveY(RectTransform rectTrans, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_MOVE_Y, options().setRect(rectTrans));
	}

	public static LTDescr moveZ(RectTransform rectTrans, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_MOVE_Z, options().setRect(rectTrans));
	}

	public static LTDescr rotate(RectTransform rectTrans, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_ROTATEAROUND, options().setRect(rectTrans).setAxis(Vector3.forward));
	}

	public static LTDescr rotateAround(RectTransform rectTrans, Vector3 axis, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_ROTATEAROUND, options().setRect(rectTrans).setAxis(axis));
	}

	public static LTDescr rotateAroundLocal(RectTransform rectTrans, Vector3 axis, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_ROTATEAROUND_LOCAL, options().setRect(rectTrans).setAxis(axis));
	}

	public static LTDescr scale(RectTransform rectTrans, Vector3 to, float time)
	{
		return pushNewTween(rectTrans.gameObject, to, time, TweenAction.CANVAS_SCALE, options().setRect(rectTrans));
	}

	public static LTDescr alpha(RectTransform rectTrans, float to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(to, 0f, 0f), time, TweenAction.CANVAS_ALPHA, options().setRect(rectTrans));
	}

	public static LTDescr color(RectTransform rectTrans, Color to, float time)
	{
		return pushNewTween(rectTrans.gameObject, new Vector3(1f, to.a, 0f), time, TweenAction.CANVAS_COLOR, options().setRect(rectTrans).setPoint(new Vector3(to.r, to.g, to.b)));
	}

	private static float tweenOnCurve(LTDescrImpl tweenDescr, float ratioPassed)
	{
		Vector3 vector = tweenDescr.from;
		float x = vector.x;
		Vector3 diff = tweenDescr.diff;
		return x + diff.x * tweenDescr.animationCurve.Evaluate(ratioPassed);
	}

	private static Vector3 tweenOnCurveVector(LTDescrImpl tweenDescr, float ratioPassed)
	{
		Vector3 vector = tweenDescr.from;
		float x = vector.x;
		Vector3 diff = tweenDescr.diff;
		float x2 = x + diff.x * tweenDescr.animationCurve.Evaluate(ratioPassed);
		Vector3 vector2 = tweenDescr.from;
		float y = vector2.y;
		Vector3 diff2 = tweenDescr.diff;
		float y2 = y + diff2.y * tweenDescr.animationCurve.Evaluate(ratioPassed);
		Vector3 vector3 = tweenDescr.from;
		float z = vector3.z;
		Vector3 diff3 = tweenDescr.diff;
		return new Vector3(x2, y2, z + diff3.z * tweenDescr.animationCurve.Evaluate(ratioPassed));
	}

	private static float easeOutQuadOpt(float start, float diff, float ratioPassed)
	{
		return (0f - diff) * ratioPassed * (ratioPassed - 2f) + start;
	}

	private static float easeInQuadOpt(float start, float diff, float ratioPassed)
	{
		return diff * ratioPassed * ratioPassed + start;
	}

	private static float easeInOutQuadOpt(float start, float diff, float ratioPassed)
	{
		ratioPassed /= 0.5f;
		if (ratioPassed < 1f)
		{
			return diff / 2f * ratioPassed * ratioPassed + start;
		}
		ratioPassed -= 1f;
		return (0f - diff) / 2f * (ratioPassed * (ratioPassed - 2f) - 1f) + start;
	}

	private static float linear(float start, float end, float val)
	{
		return Mathf.Lerp(start, end, val);
	}

	private static float clerp(float start, float end, float val)
	{
		float num = 0f;
		float num2 = 360f;
		float num3 = Mathf.Abs((num2 - num) / 2f);
		float num4 = 0f;
		float num5 = 0f;
		if (end - start < 0f - num3)
		{
			num5 = (num2 - start + end) * val;
			return start + num5;
		}
		if (end - start > num3)
		{
			num5 = (0f - (num2 - end + start)) * val;
			return start + num5;
		}
		return start + (end - start) * val;
	}

	private static float spring(float start, float end, float val)
	{
		val = Mathf.Clamp01(val);
		val = (Mathf.Sin(val * (float)Math.PI * (0.2f + 2.5f * val * val * val)) * Mathf.Pow(1f - val, 2.2f) + val) * (1f + 1.2f * (1f - val));
		return start + (end - start) * val;
	}

	private static float easeInQuad(float start, float end, float val)
	{
		end -= start;
		return end * val * val + start;
	}

	private static float easeOutQuad(float start, float end, float val)
	{
		end -= start;
		return (0f - end) * val * (val - 2f) + start;
	}

	private static float easeInOutQuad(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return end / 2f * val * val + start;
		}
		val -= 1f;
		return (0f - end) / 2f * (val * (val - 2f) - 1f) + start;
	}

	private static float easeInCubic(float start, float end, float val)
	{
		end -= start;
		return end * val * val * val + start;
	}

	private static float easeOutCubic(float start, float end, float val)
	{
		val -= 1f;
		end -= start;
		return end * (val * val * val + 1f) + start;
	}

	private static float easeInOutCubic(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return end / 2f * val * val * val + start;
		}
		val -= 2f;
		return end / 2f * (val * val * val + 2f) + start;
	}

	private static float easeInQuart(float start, float end, float val)
	{
		end -= start;
		return end * val * val * val * val + start;
	}

	private static float easeOutQuart(float start, float end, float val)
	{
		val -= 1f;
		end -= start;
		return (0f - end) * (val * val * val * val - 1f) + start;
	}

	private static float easeInOutQuart(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return end / 2f * val * val * val * val + start;
		}
		val -= 2f;
		return (0f - end) / 2f * (val * val * val * val - 2f) + start;
	}

	private static float easeInQuint(float start, float end, float val)
	{
		end -= start;
		return end * val * val * val * val * val + start;
	}

	private static float easeOutQuint(float start, float end, float val)
	{
		val -= 1f;
		end -= start;
		return end * (val * val * val * val * val + 1f) + start;
	}

	private static float easeInOutQuint(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return end / 2f * val * val * val * val * val + start;
		}
		val -= 2f;
		return end / 2f * (val * val * val * val * val + 2f) + start;
	}

	private static float easeInSine(float start, float end, float val)
	{
		end -= start;
		return (0f - end) * Mathf.Cos(val / 1f * ((float)Math.PI / 2f)) + end + start;
	}

	private static float easeOutSine(float start, float end, float val)
	{
		end -= start;
		return end * Mathf.Sin(val / 1f * ((float)Math.PI / 2f)) + start;
	}

	private static float easeInOutSine(float start, float end, float val)
	{
		end -= start;
		return (0f - end) / 2f * (Mathf.Cos((float)Math.PI * val / 1f) - 1f) + start;
	}

	private static float easeInExpo(float start, float end, float val)
	{
		end -= start;
		return end * Mathf.Pow(2f, 10f * (val / 1f - 1f)) + start;
	}

	private static float easeOutExpo(float start, float end, float val)
	{
		end -= start;
		return end * (0f - Mathf.Pow(2f, -10f * val / 1f) + 1f) + start;
	}

	private static float easeInOutExpo(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return end / 2f * Mathf.Pow(2f, 10f * (val - 1f)) + start;
		}
		val -= 1f;
		return end / 2f * (0f - Mathf.Pow(2f, -10f * val) + 2f) + start;
	}

	private static float easeInCirc(float start, float end, float val)
	{
		end -= start;
		return (0f - end) * (Mathf.Sqrt(1f - val * val) - 1f) + start;
	}

	private static float easeOutCirc(float start, float end, float val)
	{
		val -= 1f;
		end -= start;
		return end * Mathf.Sqrt(1f - val * val) + start;
	}

	private static float easeInOutCirc(float start, float end, float val)
	{
		val /= 0.5f;
		end -= start;
		if (val < 1f)
		{
			return (0f - end) / 2f * (Mathf.Sqrt(1f - val * val) - 1f) + start;
		}
		val -= 2f;
		return end / 2f * (Mathf.Sqrt(1f - val * val) + 1f) + start;
	}

	private static float easeInBounce(float start, float end, float val)
	{
		end -= start;
		float num = 1f;
		return end - easeOutBounce(0f, end, num - val) + start;
	}

	private static float easeOutBounce(float start, float end, float val)
	{
		val /= 1f;
		end -= start;
		if (val < 0.363636374f)
		{
			return end * (7.5625f * val * val) + start;
		}
		if (val < 0.727272749f)
		{
			val -= 0.545454562f;
			return end * (7.5625f * val * val + 0.75f) + start;
		}
		if ((double)val < 0.90909090909090906)
		{
			val -= 0.8181818f;
			return end * (7.5625f * val * val + 0.9375f) + start;
		}
		val -= 21f / 22f;
		return end * (7.5625f * val * val + 63f / 64f) + start;
	}

	private static float easeInOutBounce(float start, float end, float val)
	{
		end -= start;
		float num = 1f;
		if (val < num / 2f)
		{
			return easeInBounce(0f, end, val * 2f) * 0.5f + start;
		}
		return easeOutBounce(0f, end, val * 2f - num) * 0.5f + end * 0.5f + start;
	}

	private static float easeInBack(float start, float end, float val, float overshoot = 1f)
	{
		end -= start;
		val /= 1f;
		float num = 1.70158f * overshoot;
		return end * val * val * ((num + 1f) * val - num) + start;
	}

	private static float easeOutBack(float start, float end, float val, float overshoot = 1f)
	{
		float num = 1.70158f * overshoot;
		end -= start;
		val = val / 1f - 1f;
		return end * (val * val * ((num + 1f) * val + num) + 1f) + start;
	}

	private static float easeInOutBack(float start, float end, float val, float overshoot = 1f)
	{
		float num = 1.70158f * overshoot;
		end -= start;
		val /= 0.5f;
		if (val < 1f)
		{
			num *= 1.525f * overshoot;
			return end / 2f * (val * val * ((num + 1f) * val - num)) + start;
		}
		val -= 2f;
		num *= 1.525f * overshoot;
		return end / 2f * (val * val * ((num + 1f) * val + num) + 2f) + start;
	}

	private static float easeInElastic(float start, float end, float val, float overshoot = 1f, float period = 0.3f)
	{
		end -= start;
		float num = 0f;
		float num2 = 0f;
		if (val == 0f)
		{
			return start;
		}
		if (val == 1f)
		{
			return start + end;
		}
		if (num2 == 0f || num2 < Mathf.Abs(end))
		{
			num2 = end;
			num = period / 4f;
		}
		else
		{
			num = period / ((float)Math.PI * 2f) * Mathf.Asin(end / num2);
		}
		if (overshoot > 1f && val > 0.6f)
		{
			overshoot = 1f + (1f - val) / 0.4f * (overshoot - 1f);
		}
		val -= 1f;
		return start - num2 * Mathf.Pow(2f, 10f * val) * Mathf.Sin((val - num) * ((float)Math.PI * 2f) / period) * overshoot;
	}

	private static float easeOutElastic(float start, float end, float val, float overshoot = 1f, float period = 0.3f)
	{
		end -= start;
		float num = 0f;
		float num2 = 0f;
		if (val == 0f)
		{
			return start;
		}
		if (val == 1f)
		{
			return start + end;
		}
		if (num2 == 0f || num2 < Mathf.Abs(end))
		{
			num2 = end;
			num = period / 4f;
		}
		else
		{
			num = period / ((float)Math.PI * 2f) * Mathf.Asin(end / num2);
		}
		if (overshoot > 1f && val < 0.4f)
		{
			overshoot = 1f + val / 0.4f * (overshoot - 1f);
		}
		return start + end + num2 * Mathf.Pow(2f, -10f * val) * Mathf.Sin((val - num) * ((float)Math.PI * 2f) / period) * overshoot;
	}

	private static float easeInOutElastic(float start, float end, float val, float overshoot = 1f, float period = 0.3f)
	{
		end -= start;
		float num = 0f;
		float num2 = 0f;
		if (val == 0f)
		{
			return start;
		}
		val /= 0.5f;
		if (val == 2f)
		{
			return start + end;
		}
		if (num2 == 0f || num2 < Mathf.Abs(end))
		{
			num2 = end;
			num = period / 4f;
		}
		else
		{
			num = period / ((float)Math.PI * 2f) * Mathf.Asin(end / num2);
		}
		if (overshoot > 1f)
		{
			if (val < 0.2f)
			{
				overshoot = 1f + val / 0.2f * (overshoot - 1f);
			}
			else if (val > 0.8f)
			{
				overshoot = 1f + (1f - val) / 0.2f * (overshoot - 1f);
			}
		}
		if (val < 1f)
		{
			val -= 1f;
			return start - 0.5f * (num2 * Mathf.Pow(2f, 10f * val) * Mathf.Sin((val - num) * ((float)Math.PI * 2f) / period)) * overshoot;
		}
		val -= 1f;
		return end + start + num2 * Mathf.Pow(2f, -10f * val) * Mathf.Sin((val - num) * ((float)Math.PI * 2f) / period) * 0.5f * overshoot;
	}

	public static void addListener(int eventId, Action<LTEvent> callback)
	{
		addListener(tweenEmpty, eventId, callback);
	}

	public static void addListener(GameObject caller, int eventId, Action<LTEvent> callback)
	{
		if (eventListeners == null)
		{
			INIT_LISTENERS_MAX = LISTENERS_MAX;
			eventListeners = new Action<LTEvent>[EVENTS_MAX * LISTENERS_MAX];
			goListeners = new GameObject[EVENTS_MAX * LISTENERS_MAX];
		}
		for (i = 0; i < INIT_LISTENERS_MAX; i++)
		{
			int num = eventId * INIT_LISTENERS_MAX + i;
			if (goListeners[num] == null || eventListeners[num] == null)
			{
				eventListeners[num] = callback;
				goListeners[num] = caller;
				if (i >= eventsMaxSearch)
				{
					eventsMaxSearch = i + 1;
				}
				return;
			}
			if (goListeners[num] == caller && object.Equals(eventListeners[num], callback))
			{
				return;
			}
		}
		UnityEngine.Debug.LogError("You ran out of areas to add listeners, consider increasing LISTENERS_MAX, ex: LeanTween.LISTENERS_MAX = " + LISTENERS_MAX * 2);
	}

	public static bool removeListener(int eventId, Action<LTEvent> callback)
	{
		return removeListener(tweenEmpty, eventId, callback);
	}

	public static bool removeListener(GameObject caller, int eventId, Action<LTEvent> callback)
	{
		for (i = 0; i < eventsMaxSearch; i++)
		{
			int num = eventId * INIT_LISTENERS_MAX + i;
			if (goListeners[num] == caller && object.Equals(eventListeners[num], callback))
			{
				eventListeners[num] = null;
				goListeners[num] = null;
				return true;
			}
		}
		return false;
	}

	public static void dispatchEvent(int eventId)
	{
		dispatchEvent(eventId, null);
	}

	public static void dispatchEvent(int eventId, object data)
	{
		for (int i = 0; i < eventsMaxSearch; i++)
		{
			int num = eventId * INIT_LISTENERS_MAX + i;
			if (eventListeners[num] != null)
			{
				if ((bool)goListeners[num])
				{
					eventListeners[num](new LTEvent(eventId, data));
				}
				else
				{
					eventListeners[num] = null;
				}
			}
		}
	}
}
